
#include "board.h"

int32_t SysTick_Count = 0;


void SysTick_Delay_ms(int32_t count)
{
    int32_t current = SysTick_Count;
    while((SysTick_Count - current)<count);
}

void SysTick_Handler(void)
{
    SysTick_Count++;
    if(!(SysTick_Count % 500))
        LED_Toggle(LedWork);
}

int main (void)
{
    SystemCoreClockUpdate();
    Display_Init();
    SysTick_Config(SystemCoreClock/1000);

    while(1) {
        Display_Address(Get_Address());
        if(Get_Cfg_Pin_Value(CfgBaudrate))
            LED_On(LedError);
        else
            LED_Off(LedError);
    }
}
